﻿<Page x:Class="ExtendedTextBoxDemo.Views.ExampleView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:AppBar="clr-namespace:TimePunch.Metro.Wpf.Controls.AppBar;assembly=TpMetroWpfLibrary" 
      xmlns:TextBox="clr-namespace:TimePunch.Metro.Wpf.Controls.TextBox;assembly=TpMetroWpfLibrary" 
      DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=ExampleViewModel}"
      KeepAlive="True"   
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="ExampleView">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"    />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Margin="{StaticResource WinMargin}">

            <TextBlock Margin="{StaticResource WinMargin}" 
                       Text="Standard TextBox" 
                       Style="{StaticResource WinTextTitle2Style}"/>

            <TextBox   Margin="{StaticResource WinMargin}" 
                       Text="{Binding StandardText, Mode=TwoWay}"
                       Style="{StaticResource WinInputBoxNormalStyle}"/>

            <TextBlock Margin="{StaticResource WinMargin}" 
                       Text="Extended TextBox" 
                       Style="{StaticResource WinTextTitle2Style}"/>

            <TextBox:ExtendedTextBox   
                       Margin="{StaticResource WinMargin}" 
                       Text="{Binding ExtendedText, Mode=TwoWay}"
                       ApplicationBar="{Binding ElementName=AppBar}"
                       Style="{StaticResource WinInputBoxNormalStyle}"/>

        </StackPanel>


        <AppBar:ApplicationBar Grid.Row="1" x:Name="AppBar">
            <AppBar:ApplicationBar.Icons>
                <AppBar:ApplicationBarIcon ImageSource="/TpMetroWpfLibrary;component/Images/appbar.save.png"
                                           Description="save"
                                           Command="{Binding SaveCommand}"/>
            </AppBar:ApplicationBar.Icons>
        </AppBar:ApplicationBar>


    </Grid>
</Page>
